package com.example.goukakuproject;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class GKGrammardetail extends Activity {

	int trinhDo = 0;
	int bai = 0;
	int soLuongNguPhap = 0;
	int nguPhapThu = 0;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.layout_gkgrammardetail);
		Intent callerIntent=getIntent();
		Bundle packageFromCaller = callerIntent.getBundleExtra("GrammarTabIntent");
		bai = packageFromCaller.getInt("bai");
		trinhDo = packageFromCaller.getInt("trinhdo");
		nguPhapThu = packageFromCaller.getInt("nguphapthu");
		soLuongNguPhap = 40; // Cai nay sau se lay tu database
		Toast.makeText(this, "Đây là ngữ pháp số " + nguPhapThu, Toast.LENGTH_LONG).show();
		Button btnDanhSach = (Button) findViewById(R.id.btnBackToGramrList);		
		btnDanhSach.setOnClickListener(new View.OnClickListener() {			
			@Override
			public void onClick(View v) {
				finish();				
			}
		});	
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.gkgrammardetail, menu);
		return true;
	}

}
